/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author julio
 */
@Entity
@Table(name = "routes", catalog = "transit", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Routes.findAll", query = "SELECT r FROM Routes r"),
    @NamedQuery(name = "Routes.findByRouteId", query = "SELECT r FROM Routes r WHERE r.routeId = :routeId"),
    @NamedQuery(name = "Routes.findByAgencyId", query = "SELECT r FROM Routes r WHERE r.agencyId = :agencyId"),
    @NamedQuery(name = "Routes.findByRouteShortName", query = "SELECT r FROM Routes r WHERE r.routeShortName = :routeShortName"),
    @NamedQuery(name = "Routes.findByRouteLongName", query = "SELECT r FROM Routes r WHERE r.routeLongName = :routeLongName"),
    @NamedQuery(name = "Routes.findByRouteDesc", query = "SELECT r FROM Routes r WHERE r.routeDesc = :routeDesc"),
    @NamedQuery(name = "Routes.findByRouteType", query = "SELECT r FROM Routes r WHERE r.routeType = :routeType"),
    @NamedQuery(name = "Routes.findByRouteUrl", query = "SELECT r FROM Routes r WHERE r.routeUrl = :routeUrl"),
    @NamedQuery(name = "Routes.findByRouteColor", query = "SELECT r FROM Routes r WHERE r.routeColor = :routeColor"),
    @NamedQuery(name = "Routes.findByRouteTextColor", query = "SELECT r FROM Routes r WHERE r.routeTextColor = :routeTextColor")})
public class Routes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "route_id", nullable = false, length = 45)
    private String routeId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "agency_id", nullable = false, length = 45)
    private String agencyId;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 45)
    @Column(name = "route_short_name", nullable = false, length = 45)
    private String routeShortName;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 255)
    @Column(name = "route_long_name", nullable = false, length = 255)
    private String routeLongName;
    @Size(max = 255)
    @Column(name = "route_desc", length = 255)
    private String routeDesc;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 2)
    @Column(name = "route_type", nullable = false, length = 2)
    private String routeType;
    @Size(max = 45)
    @Column(name = "route_url", length = 45)
    private String routeUrl;
    @Size(max = 6)
    @Column(name = "route_color", length = 6)
    private String routeColor;
    @Size(max = 6)
    @Column(name = "route_text_color", length = 6)
    private String routeTextColor;

    public Routes() {
    }

    public Routes(String routeId) {
        this.routeId = routeId;
    }

    public Routes(String routeId, String agencyId, String routeShortName, String routeLongName, String routeType) {
        this.routeId = routeId;
        this.agencyId = agencyId;
        this.routeShortName = routeShortName;
        this.routeLongName = routeLongName;
        this.routeType = routeType;
    }

    public String getRouteId() {
        return routeId;
    }

    public void setRouteId(String routeId) {
        this.routeId = routeId;
    }

    public String getAgencyId() {
        return agencyId;
    }

    public void setAgencyId(String agencyId) {
        this.agencyId = agencyId;
    }

    public String getRouteShortName() {
        return routeShortName;
    }

    public void setRouteShortName(String routeShortName) {
        this.routeShortName = routeShortName;
    }

    public String getRouteLongName() {
        return routeLongName;
    }

    public void setRouteLongName(String routeLongName) {
        this.routeLongName = routeLongName;
    }

    public String getRouteDesc() {
        return routeDesc;
    }

    public void setRouteDesc(String routeDesc) {
        this.routeDesc = routeDesc;
    }

    public String getRouteType() {
        return routeType;
    }

    public void setRouteType(String routeType) {
        this.routeType = routeType;
    }

    public String getRouteUrl() {
        return routeUrl;
    }

    public void setRouteUrl(String routeUrl) {
        this.routeUrl = routeUrl;
    }

    public String getRouteColor() {
        return routeColor;
    }

    public void setRouteColor(String routeColor) {
        this.routeColor = routeColor;
    }

    public String getRouteTextColor() {
        return routeTextColor;
    }

    public void setRouteTextColor(String routeTextColor) {
        this.routeTextColor = routeTextColor;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (routeId != null ? routeId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Routes)) {
            return false;
        }
        Routes other = (Routes) object;
        if ((this.routeId == null && other.routeId != null) || (this.routeId != null && !this.routeId.equals(other.routeId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "jpa.entities.Routes[ routeId=" + routeId + " ]";
    }
    
}
